/**
  mensei-system: An inventory and point-of-sale system for Mensei Enterprise
  Copyright (C) 2011 Aldo Balagulan, Patrick Calulo, Wyn Manlim

  This file is part of mensei-system.

  mensei-system is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  mensei-system is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with mensei-system.  If not, see <http://www.gnu.org/licenses/>.
  */

/*
  ShinyList code is based on code from:
  http://qt-articles.blogspot.com/2010/07/how-to-customize-listview-in-qt-using.html

  Coding style modified, and made more object-oriented
 */
#include <QIcon>
#include "shinylistitem.h"
#include "shinylistdelegate.h"

ShinyListItem::ShinyListItem()
{
    this->setEditable(false);
}

void ShinyListItem::setMainText(QString mainText)
{
    this->setData(mainText, ShinyListDelegate::HeaderRole);
}

void ShinyListItem::setSubText(QString subText)
{
    this->setData(subText, ShinyListDelegate::SubHeaderRole);
}

void ShinyListItem::setItemIcon(QString path)
{
    QIcon icon(path);
    this->setData(icon, ShinyListDelegate::IconRole);
}
